package com.zhny.sensor.service;

import com.zhny.sensor.dao.UserRespontity;
import com.zhny.sensor.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: zhy
 * @Date: 2019/11/10
 * @Description: 用户服务
 */
@Service
public class UserService {

    @Autowired
    private UserRespontity userRespontity;

    public List<User> getAllUser() {
        return userRespontity.findAll();
    }

    public User findById(String userId) {
        return userRespontity.findById(userId).get();
    }



}
